﻿// Original author contact info: Owen Emlen (owene_1998@yahoo.com)
// Note: other individuals may also have contributed to this code
// Project hosted on CodePlex.com as of 1/10/2009 at http://www.codeplex.com/EmlenMud
using System.Runtime.Serialization;
using System;
using System.Xml.Serialization;
using System.Threading;
using System.Reflection;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrainTechLLC.ThreadSafeObjects;

namespace BrainTechLLC
{    
    public class ShutdownCommand : Command, ICommandInfo
    {
        public override string HelpText { get { return "Shuts down the game engine"; } }

        [NonSerialized, XmlIgnore]
        public static List<string> Words = new List<string>() { "SHUTDOWN" };

        public override List<string> FirstWords { get { return Words; } }

        [MethodVisible]
        public override CommandToPerform CreateCommand(IGameThing source, string first, string input)
        {
            return new CommandToPerform(source.AssociatedID, input) { PerformInfo = "ShutdownCommand.Perform" };
        }

        [MethodVisible]
        public static List<PerceivedEventAndAudience> Perform(CommandToPerform cmd, IGameThing source, IGameThing target, PropertyData args, PropertyData modifyingArguments)
        {
            Globals.Shutdown();
            return null;
        }
    }


}
